Method and apparatus for determining automatic parking strategy

ABSTRACT

This application provides a method for determining an automatic parking strategy. The method includes: determining, a target parking action corresponding to a current parking stage performing the target parking action; obtaining feedback information, where the feedback information is used to indicate whether a result of performing the target parking action reaches a predetermined objective, and the predetermined objective is a predetermined position of the vehicle relative to a target parking spot, and/or the predetermined objective is a status of the vehicle in the parking process; and updating the automatic parking strategy based on the feedback information. In the foregoing method, the entire parking process is divided into several parking stages, and a control strategy is obtained by using a different method at each stage. This can increase a success rate of automatic parking in a complex parking scenario.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2019/092722, filed on Jun. 25, 2019, which claims priority toChinese Patent Application No. 201810696037.0, filed on Jun. 29, 2018.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the application relates to the self-driving field, and inparticular, to a method and an apparatus for determining an automaticparking strategy.

BACKGROUND

An automatic parking system is a system by which a vehicle canautomatically drive to a parking spot in a parallel manner, a verticalmanner, or an angle manner. A core idea of the system is to plan asteering angle and a speed that are of the vehicle, so as to obtain anideal parking path that can be followed within limited driving space.For example, an in-vehicle processor performs calculation and performs aseries of control actions, in real time according to a parking strategyby using sensor data from a vehicle servo system and data of a distancebetween the vehicle and an obstacle, so that the vehicle drives to theparking spot.

In an available automatic parking method, different parking scenarios(for example, different aisle widths, a size of a target parking spot,and a start pose of an ego-vehicle) are solved, to obtain an availablecontrol strategy. For example, a parking path is planned throughcircular arc planning or by using a vector field, to obtain theavailable control strategy.

The foregoing method has a comparatively strong generalizationcapability. However, for some complex parking scenarios, it is difficultto obtain a satisfactory result by using the foregoing method. Forexample, circular arc planning has a comparatively high requirement forparking space and cannot be implemented in some narrow parking space,and a solution calculated by using the vector field cannot ensureconvergence. Consequently, it is difficult to implement automaticparking in a complex parking scenario.

SUMMARY

This application provides a method and an apparatus for determining anautomatic parking strategy. An entire parking process is divided intoseveral parking stages, and a control strategy is obtained by using adifferent method at each stage. This can increase a success rate ofautomatic parking in a complex parking scenario.

According to a first aspect, a method for determining an automaticparking strategy is provided, and includes: determining, according to anautomatic parking strategy, a target parking action corresponding to acurrent parking stage, where the current parking stage is one of aplurality of parking stages included in a parking process of a vehicle;performing the target parking action; obtaining feedback information,where the feedback information is used to indicate whether a result ofperforming the target parking action reaches a predetermined objective,and the predetermined objective is a predetermined position of thevehicle relative to a target parking spot, and/or the predeterminedobjective is a status of the vehicle in the parking process; andupdating the automatic parking strategy based on the feedbackinformation.

A device for performing the method is, for example, an in-vehicleprocessor. The in-vehicle processor may divide the parking process ofthe vehicle into three stages. For example, an included angle between alongitudinal axis of the vehicle and a longitudinal axis of the targetparking spot is first adjusted to be less than 60 degrees, the includedangle is then adjusted to be less than 30 degrees, and the includedangle is then adjusted to be less than 5 degrees. When the includedangle is less than 5 degrees, it may be considered that parkingsucceeds. Compared with a solution in which the included angle isdirectly adjusted to be less than 5 degrees in a load parking scenario,reaching a predetermined objective at each of the stages according tothis embodiment reduces implementation difficulty, and obtaining anautomatic parking strategy at each stage can be much easier, therebyimproving a success rate of automatic parking in a complex parkingscenario.

In one embodiment, before the determining, according to an automaticparking strategy, a target parking action corresponding to a currentparking stage, the method further includes: determining the currentparking stage based on an included angle between a preset direction ofthe vehicle and a reference direction, where there is a presetcorrespondence between the current parking stage and the included angle.

Usually, parking cannot be considered to be successful when the vehicledrives to the target parking spot, and that the included angle betweenthe preset direction (for example, a longitudinal axis direction) of thevehicle and the reference direction (for example, a longitudinal axisdirection of the target parking spot) is less than an included anglethreshold further needs to be determined, so as to determine that thevehicle is parked successfully. Therefore, a current parking stage canbe accurately determined based on a result of comparison between theincluded angle threshold and the included angle between the presetdirection of the vehicle and the reference direction.

In one embodiment, the preset direction of the vehicle is thelongitudinal axis direction of the vehicle, the reference direction isthe longitudinal axis direction of the target parking spot, and theincluded angle is an acute angle or a right angle.

When the vehicle is parked successfully, the longitudinal axis of thevehicle is parallel to or approximately parallel to the longitudinalaxis of the target parking spot. Therefore, whether the vehicle isparked successfully can be more easily determined by using thelongitudinal axis of the vehicle as the preset direction of the vehicleand using the longitudinal axis of the target parking spot as thereference direction.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes: when the included angle is greater than or equal toa first included angle threshold, determining that the current parkingstage is an initial stage, where the first included angle threshold isless than 90 degrees.

The first included angle threshold may be a threshold specified based onexpert experience. When the included angle is greater than or equal tothe first included angle threshold, it indicates that there is acomparatively large difference between a pose of the vehicle in thiscase and a pose used when parking is completed. Therefore, it can bedetermined that the vehicle is at the initial stage in this case, andthe pose of the vehicle is adjusted based on a target parking action atthe initial stage, so that the vehicle reaches a predetermined objectiveat the initial stage, to perform an action at a next stage.

In one embodiment, the target parking action at the initial stage isdriving to the target parking spot at a first steering angle, where thefirst steering angle is less than a maximum steering angle of thevehicle; and the predetermined objective at the initial stage is thatthe included angle is less than or equal to the first included anglethreshold and the vehicle enters the target parking spot.

Both the target parking action and the predetermined objective at theinitial stage may be specified based on expert experience. The firststeering angle may be a comparatively large angle, so that the vehicleis quickly adjusted to reach the predetermined objective.

In one embodiment, the automatic parking strategy is determining, as thetarget parking action, a parking action with a highest value in aplurality of parking actions corresponding to the current parking stage;and the updating the automatic parking strategy based on the feedbackinformation includes: when the feedback information is the includedangles at two adjacent moments, and an absolute value of a differencebetween the included angles at the two adjacent moments is greater thana preset included angle threshold, reducing a value of the targetparking action.

A value of a parking action is directly proportional to a probabilitythat the parking action becomes the target parking action. For thedetermined target parking action, a value obtained after the targetparking action is completed is determined by using the feedbackinformation and according to a preset value increase/reduction rule, sothat whether the target parking action is suitable for the currentparking stage can be checked. Each time the target parking action iscompleted, the processor updates a self-driving strategy, and determinesa parking action with a highest value again, so that the self-drivingstrategy is continuously improving.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes: when the included angle is greater than a secondincluded angle threshold and less than the first included anglethreshold, determining that the current parking stage is a transitionstage, where both the first included angle threshold and the secondincluded angle threshold are less than 90 degrees, and the secondincluded angle threshold is less than the first included anglethreshold.

The first included angle threshold and the second included anglethreshold may be thresholds specified based on expert experience, andthe first included angle threshold is a value less than 90 degrees. Whenthe included angle is greater than the second included angle thresholdand less than the first included angle threshold, it indicates that apose of the vehicle in this case has been adjusted to an appropriatepose. Therefore, it can be determined that the vehicle is at thetransition stage in this case, and the pose of the vehicle is adjustedbased on a target parking action at the transition stage, so that thevehicle reaches a predetermined objective at the transition stage, toperform an action at a next stage.

In one embodiment, the target parking action at the transition stage isdriving to the target parking spot at a second steering angle, where thesecond steering angle is equal to the maximum steering angle of thevehicle; and the predetermined objective at the transition stage is thatthe included angle is less than or equal to the second included anglethreshold and the vehicle enters the target parking spot.

Both the target parking action and the predetermined objective at thetransition stage may be specified based on expert experience. Becausethe pose of the vehicle has been adjusted to the appropriate pose at theinitial stage, the second steering angle may be the maximum steeringangle of the vehicle, so that the vehicle is quickly adjusted to reachthe predetermined objective.

In one embodiment, the automatic parking strategy is determining, as thetarget parking action, a parking action with a highest value in aplurality of parking actions corresponding to the current parking stage;and the updating the automatic parking strategy based on the feedbackinformation includes: when the feedback information is θ₁ and θ_(t−1),and |θ_(t)|<|θ_(t−1)|, increasing the value of the target parking actionbased on ↓_(t) and θ_(t−1), where θ_(t) and θ_(t−1) are the includedangles at the two adjacent moments, |θ_(t)|≠0, and the value of thetarget parking action is directly proportional to

$\frac{\theta_{t - 1}}{\theta_{t}}.$

A value of a parking action is directly proportional to a probabilitythat the parking action becomes the target parking action. For thedetermined target parking action, a value obtained after the targetparking action is completed is determined by using the feedbackinformation and according to a preset value increase/reduction rule, sothat whether the target parking action is suitable for the currentparking stage can be checked. Each time the target parking action iscompleted, the processor updates a self-driving strategy, and determinesa parking action with a highest value again, so that the self-drivingstrategy is continuously improving.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes: when the included angle is less than or equal to thesecond included angle threshold, determining that the current parkingstage is a fine-tuning stage, where the second included angle thresholdis less than 90 degrees.

The second included angle threshold may be a threshold specified basedon expert experience, and the second included angle threshold is a valueless than 90 degrees. When the included angle is less than or equal tothe second included angle threshold, it indicates that there is a littledifference between a pose of the vehicle in this case and a pose usedwhen parking succeeds. Therefore, it can be determined that the vehicleis at the fine-tuning stage, and the pose of the vehicle is adjustedbased on a target parking action at the fine-tuning stage, so that thevehicle reaches a predetermined objective at the fine-tuning stage tocomplete parking.

In one embodiment, the target parking action at the fine-tuning stage isdriving to the target parking spot at a third steering angle, where thethird steering angle is less than the maximum steering angle of thevehicle; and the predetermined objective at the fine-tuning stage isthat the included angle is less than or equal to a third included anglethreshold and the vehicle enters the target parking spot position, wherethe third included angle threshold is less than the second includedangle threshold.

Both the target parking action and the predetermined objective at thefine-tuning stage may be specified based on expert experience. Becausethere is a little difference between the pose of the vehicle at thefine-tuning stage and the pose of the vehicle that is used when parkingsucceeds, the third steering angle may be a comparatively small angle,to reach the predetermined objective.

In one embodiment, the automatic parking strategy is determining, as thetarget parking action, the parking action with the highest value in theplurality of parking actions corresponding to the current parking stage;and the updating the automatic parking strategy based on the feedbackinformation includes: when the feedback information is d_(t), d_(t−1),θ_(t), and θ_(t−1), and |d_(t)|<|d_(t−1)| and |θ_(t)|<|θ_(t−1)|,increasing the value of the target parking action based on d_(t) andd_(t−1), where d_(t) and d_(t−1) are Euclidean distances between thevehicle and the target parking spot at the two adjacent moments, θ_(t)and θ_(t−1) are the included angles at the two adjacent moments,|d_(t)|≠0, and the value of the target parking action is directlyproportional to

$\frac{d_{t - 1}}{d_{t}}.$

A value of a parking action is directly proportional to a probabilitythat the parking action becomes the target parking action. For thedetermined target parking action, a value obtained after the targetparking action is completed is determined by using the feedbackinformation and according to a preset value increase/reduction rule, sothat whether the target parking action is suitable for the currentparking stage can be checked. Each time the target parking action iscompleted, the processor updates a self-driving strategy, and determinesa parking action with a highest value again, so that the self-drivingstrategy is continuously improving.

In one embodiment, the updating the automatic parking strategy based onthe feedback information further includes: when the feedback informationis that a collision and/or an out-of-bounds case occur/occurs in aprocess of performing the target parking action, reducing the value ofthe target parking action; and/or when the feedback information is thatthe predetermined objective is reached, increasing the value of thetarget parking action.

If a collision and/or an out-of-bounds case occur/occurs in the parkingprocess, it indicates that the target parking action is not applicableto the current parking stage, and the value of the target parking actionneeds to be reduced. If the predetermined objective is reached after thetarget parking action is performed, it indicates that the target parkingaction is desirable, and the value of the target parking action needs tobe increased.

According to a second aspect, an apparatus for determining an automaticparking strategy is provided. The apparatus may implement functionscorresponding to the steps in the method in the first aspect, and thefunctions may be implemented by hardware, or may be implemented byhardware executing corresponding software. The hardware or softwareincludes one or more units or modules corresponding to the foregoingfunctions.

In a possible design, the apparatus includes a processor and acommunications interface. The processor is configured to support theapparatus to perform a corresponding function in the method in the firstaspect. The communications interface is configured to supportcommunication between the apparatus and another network element. Theapparatus may further include a memory. The memory is configured tocouple to the processor, and stores a program instruction and data thatare necessary for the apparatus.

According to a third aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores computer programcode, and when the computer program code is executed by a processingunit or a processor, an apparatus for determining an automatic parkingstrategy is enabled to perform the method described in the first aspect.

According to a fourth aspect, a computer program product is provided.The computer program product includes computer program code, and whenthe computer program code is run by a communications unit or acommunications interface and a processing unit or a processor that areof an apparatus for determining an automatic parking strategy, theapparatus for determining an automatic parking strategy is enabled toperform the method in the first aspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of an automatic parking scenarioapplicable to this application;

FIG. 2 is a schematic diagram of an automatic parking procedureaccording to this application;

FIG. 3A and FIG. 3B are a schematic diagram of another automatic parkingprocedure according to this application;

FIG. 4 is a schematic diagram of a method for determining an automaticparking strategy according to this application;

FIG. 5 is a schematic diagram of a pose of an ego-vehicle at an initialstage according to this application;

FIG. 6 is a schematic diagram of a pose of an ego-vehicle at atransition stage according to this application;

FIG. 7 is a schematic diagram of a pose of an ego-vehicle at afine-tuning stage according to this application;

FIG. 8 is a schematic diagram of an apparatus for determining anautomatic parking strategy according to this application; and

FIG. 9 is a schematic diagram of another apparatus for determining anautomatic parking strategy according to this application.

DESCRIPTION OF EMBODIMENTS

The following describes technical solutions of this application withreference to accompanying drawings.

FIG. 1 is a schematic diagram of an automatic parking scenarioapplicable to this application. The parking scenario shown in FIG. 1includes four parking spots and four cars. Three cars occupy threeparking spots, and a fourth car (referred to as an “ego-vehicle”) needsto drive from a position shown in FIG. 1 to the remaining one (namely, atarget parking spot) of the four parking spots, and is prevented fromcolliding with another vehicle in the driving process.

An environment perception module, a planning control module, and avehicle control module are installed in the ego-vehicle. The environmentperception module is configured to measure environment information suchas a position and an orientation that are of the ego-vehicle, a positionof the target parking spot, and a distance between the ego-vehicle andan obstacle (including the another vehicle). The planning control module(for example, an in-vehicle processor) is configured to: determine atarget parking action according to an automatic parking strategy andbased on the environment information obtained by the environmentperception module through measurement, and output an action commandcorresponding to the target parking action. The vehicle control modulecontrols, according to the action command that is output by the planningcontrol module, the ego-vehicle to bypass the obstacle and drive to thetarget parking spot, so as to complete automatic parking. The foregoingautomatic parking procedure is shown in FIG. 2.

Usually, more obstacles around an ego-vehicle indicate a more complexparking environment and higher difficulty in determining an automaticparking strategy. Fewer obstacles around an ego-vehicle indicate asimpler parking environment and lower difficulty in determining anautomatic parking strategy. A method for determining an automaticparking strategy according to this application is described below withreference to FIG. 3A and FIG. 3B.

As shown in FIG. 3A and FIG. 3B, the procedure for determining anautomatic parking strategy according to this application includes thefollowing steps:

S1. The planning control module obtains status information of anego-vehicle from the environment perception module. The statusinformation includes a position and an orientation that are of theego-vehicle relative to a target parking spot and information about adistance between the ego-vehicle and a surrounding obstacle.

S2. Determine, based on the status information of the ego-vehicle, aparking stage of the ego-vehicle, and adaptively define correspondingaction space and a corresponding environment feedback mechanism based ona characteristic of a current parking stage.

S2.1. A stage 1 is an initial stage and has an objective of adjustingthe ego-vehicle to an ideal start pose.

S2.2. A stage 2 is a transition stage and has an objective of adjustinga pose of the ego-vehicle to a target parking pose by fully using space.

S2.3. A stage 3 is a fine-tuning stage and has an objective of adjustingthe pose of the ego-vehicle to an ideal parking pose throughfine-tuning.

S2.4. Obtain, based on the stage objectives in S2.1 to S2.3, actionspace applicable to different stages, and define environment feedbackfunctions at the different stages. The action space is a set of aplurality of parking actions (for example, A1, A2, and A3). The planningcontrol module selects, based on the current parking stage, one parkingaction (for example, the action A1) from the set as a target parkingaction at the current parking stage. The environment feedback functionis used to determine a value of the action A1, in one embodiment,determine whether the action A1 can continue to be used as the targetparking action.

S3. Select, by using a reinforcement learning-based approach, anexpected action from the action space defined in S2, for example,select, by using an ε-greedy strategy in a deep Q-learning neuralnetwork (deep Q-network, DQN), the target parking action from the actionspace defined in S2. A probability that a parking action is randomlyselected as the target parking action from the action space defined inS2 is ε, and a probability that a current parking action correspondingto a maximum Q value is randomly selected as the target parking actionfrom the action space defined in S2 is −ε.

S4. Perform the action selected in S3, and obtain environment feedbackaccording to the environment feedback mechanism defined in S2, in oneembodiment, obtain an instant evaluation signal used to evaluate thetarget parking action. For example, a negative feedback is given if acollision occurs after the target parking action is completed, or apositive feedback is given if a stage objective is reached.

S5. Store the information obtained in S2, S3, and S4; and update, in amini-batch stochastic gradient descent manner, reinforcement learningmodels corresponding to the different stages. The models correspondingto the three stages are obtained through cascade training.

S6. Determine whether the model corresponding to the stages areconverged. In this step, determining needs to be performed based on asuccess rate that is of reaching a stage objective and that is of amodel in an application mode, smoothness of trajectories obtained afterall parking actions are completed, and another possible evaluationcriterion. This is not particularly limited herein.

Based on the foregoing procedure, the following describes in detail amethod for determining an automatic parking strategy according to thisapplication.

As shown in FIG. 4, a device for performing the method 400 may be anin-vehicle processor, or may be a vehicle including a processor, or maybe a server. The device for performing the method 400 is not limited inthis application. The method 400 includes the following steps.

S410. Determine, according to an automatic parking strategy, a targetparking action corresponding to a current parking stage, where thecurrent parking stage is one of a plurality of parking stages includedin a parking process of a vehicle.

The parking process may be divided into two parking stages, or theparking process may be divided into three parking stages. A quantity ofthe plurality of parking stages may alternatively be another value. Itshould be noted that, the parking process is a complete parking process.In an optional example, the vehicle (also referred to as an“ego-vehicle”) may complete parking without going through the completeparking process. For example, a complete parking process is divided intoan initial stage and a fine-tuning stage based on an included anglebetween a longitudinal axis of the vehicle and a longitudinal axis of atarget parking spot. The included angle at the initial stage is larger,and the included angle at the fine-tuning stage is smaller. Afterentering a garage, the vehicle determines that the target parking spotis right in front of the vehicle, that is, the included angle betweenthe longitudinal axis of the vehicle and the longitudinal axis of thetarget parking spot is comparatively small. In this case, the vehiclecan directly enter the fine-tuning stage.

The automatic parking strategy may be selecting, from a parking actionset corresponding to the current parking stage, an appropriate parkingaction as the target parking action. For example, the parking action iscontrolling a steering angle and a speed, the appropriate parking actionis a parking action with a highest value in the parking action set, orthe appropriate parking action is a least time-consuming parking actionin the parking action set when no collision occurs. Alternatively, theautomatic parking strategy may be a target parking action determined inreal time based on the current parking stage, for example, a targetparking action determined through circular arc planning or by using avector field. The automatic parking strategy is not limited in thisapplication.

S420. Perform the target parking action.

A processor outputs an action instruction corresponding to the targetparking action, to perform the target parking action.

S430. Obtain feedback information, where the feedback information isused to indicate whether a result of performing the target parkingaction reaches a predetermined objective, and the predeterminedobjective is a predetermined position of the vehicle relative to thetarget parking spot, and/or the predetermined objective is a status ofthe vehicle in the parking process.

The feedback information may be a distance between the ego-vehicle andan obstacle, or may be a relative position between the ego-vehicle andthe target parking spot, or may be that “the predetermined objective isreached” or “the predetermined objective is not reached”. For example,the predetermined objective is to complete parking, and when thefeedback information is that a distance between the ego-vehicle and avehicle (namely, the obstacle) near a parking spot is less than 50centimeters, the processor may determine, based on the feedbackinformation, that performing the target parking action by theego-vehicle reaches the predetermined objective. For another example,the predetermined objective is to complete parking, and when thefeedback information is that the ego-vehicle completely enters thetarget parking spot, the processor may determine, based on the feedbackinformation, that performing the target parking action by theego-vehicle reaches the predetermined objective.

The predetermined objective and the feedback information mayalternatively be other content. For example, the predetermined objectiveis a small discrete steering angle, and the feedback information is asteering angle at each moment. If the steering angle at each moment isless than or equal to the steering angle specified by the predeterminedobjective, the processor determines, based on the feedback information,that performing the target parking action by the ego-vehicle reaches thepredetermined objective; otherwise, the processor determines thatperforming the target parking action by the ego-vehicle does not reachthe predetermined objective.

It should be noted that S420 and S430 may be performed in an actualparking process, or may be performed in a simulator or a simulationenvironment.

S440. Update the automatic parking strategy based on the feedbackinformation.

If the feedback information indicates that performing the target parkingaction reaches the predetermined objective, it indicates that the targetparking action is applicable to the current parking stage, and a valueof the target parking action may be increased, so that the targetparking action more easily matches the current parking stage, that is,the automatic parking strategy is updated. If the feedback informationindicates that performing the target parking action does not reach thepredetermined objective, it indicates that the target parking action isnot applicable to the current parking stage, and a value of the targetparking action may be reduced, so that the target parking action doesnot easily match the current parking stage, that is, the automaticparking strategy is updated.

To sum up, compared with a method for determining an automatic parkingstrategy by using the complete parking process as an objective, themethod 400 divides the parking process of the vehicle into at least twostages, so that difficulty in reaching an objective at each stage isreduced, and obtaining an automatic parking strategy corresponding tothe complete parking process is much easier, thereby increasing asuccess rate of automatic parking in a complex parking scenario.

In one embodiment, before S410, the method 400 further includes:

determining the current parking stage based on an included angle betweena preset direction of the vehicle and a reference direction, where thereis a preset correspondence between the current parking stage and theincluded angle.

Usually, parking cannot be considered to be successful when the vehicledrives to the target parking spot, and that the included angle betweenthe preset direction (for example, a longitudinal axis direction) of thevehicle and the reference direction (for example, a longitudinal axisdirection of the target parking spot) is less than an included anglethreshold further needs to be determined, so as to determine that thevehicle is parked successfully. Therefore, a current parking stage canbe accurately determined based on a result of comparison between theincluded angle threshold and the included angle between the presetdirection of the vehicle and the reference direction.

Alternatively, a current parking stage of the parking process may bedetermined in another manner (for example, a distance between thevehicle and the target parking spot). This is not limited in thisapplication.

In one embodiment, the preset direction of the vehicle is thelongitudinal axis direction of the vehicle, the reference direction isthe longitudinal axis direction of the target parking spot, and theincluded angle between the longitudinal axis direction of the vehicleand the longitudinal axis direction of the target parking spot is anacute angle or a right angle.

A projection of the vehicle on the ground is usually a rectangle, andthe longitudinal axis of the vehicle is a direction of a long side ofthe rectangle of the vehicle. The longitudinal axis of the vehicle mayalternatively be defined in another manner, for example, a perpendicularbisector of a connecting line between two front wheels of the vehicle,or a direction facing the driver, or a direction in which a car drivesin a straight line. The target parking spot is usually also a rectangle,and the longitudinal axis of the target parking spot may be defined as adirection of a long side of the rectangle.

When the vehicle is parked successfully, the longitudinal axis of thevehicle is parallel to or approximately parallel to the longitudinalaxis of the target parking spot. Therefore, whether the vehicle isparked successfully can be more easily determined by using thelongitudinal axis of the vehicle as the preset direction of the vehicleand using the longitudinal axis of the target parking spot as thereference direction.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes:

when the included angle is greater than or equal to a first includedangle threshold, determining that the current parking stage is aninitial stage, where the first included angle threshold is less than 90degrees.

The first included angle threshold may be a threshold specified based onexpert experience. When the included angle is greater than or equal tothe first included angle threshold, it indicates that there is acomparatively large difference between a pose of the vehicle in thiscase and a pose used when parking is completed. Therefore, it can bedetermined that the vehicle is at the initial stage in this case, andthe pose of the vehicle is adjusted based on a target parking action atthe initial stage, so that the vehicle reaches a predetermined objectiveat the initial stage, to perform an action at a next stage.

In one embodiment, the target parking action at the initial stage isdriving to the target parking spot at a first steering angle, where thefirst steering angle is less than a maximum steering angle of thevehicle; and the predetermined objective at the initial stage is thatthe included angle is less than or equal to the first included anglethreshold and the vehicle enters the target parking spot.

Both the target parking action and the predetermined objective at theinitial stage may be specified based on expert experience. The firststeering angle may be a comparatively large angle, so that the vehicleis quickly adjusted to reach the predetermined objective.

FIG. 5 is a schematic diagram of a pose of the ego-vehicle at theinitial stage according to this application. The longitudinal axis ofthe ego-vehicle is the preset direction of the ego-vehicle, and thelongitudinal axis of the target parking spot is the reference direction.If it is determined, based on expert experience, that the first includedangle threshold is 60 degrees, and the included angle 0 between thelongitudinal axis of the ego-vehicle and the longitudinal axis of thetarget parking spot is 80 degrees, it is determined that the currentparking stage is the initial stage. The first steering angle may be acomparatively small angle (for example, 5 degrees), so that a parkingtrajectory at the initial stage is much smoother.

After it is determined that the current parking stage is the initialstage, the target parking action may be determined according to anautomatic parking strategy at the initial stage.

In one embodiment, the automatic parking strategy at the initial stageis determining, as the target parking action, a parking action with ahighest value in a plurality of parking actions corresponding to thecurrent parking stage; and the updating the automatic parking strategybased on the feedback information includes: when an absolute value of adifference between the included angles at two adjacent moments isgreater than a preset included angle threshold, reducing a value of thetarget parking action; and/or when the feedback information is that acollision and/or an out-of-bounds case occur/occurs in a process ofperforming the target parking action, reducing the value of the targetparking action; and/or when the feedback information is that thepredetermined objective is reached, increasing the value of the targetparking action.

A value of a parking action is directly proportional to a probabilitythat the parking action becomes the target parking action. For thedetermined target parking action, a value obtained after the targetparking action is completed is determined by using the feedbackinformation and according to a preset value increase/reduction rule, sothat whether the target parking action is suitable for the currentparking stage can be checked. Each time the target parking action iscompleted, the processor updates a self-driving strategy, and determinesa parking action with a highest value again, so that the self-drivingstrategy is continuously improving.

For example, when θ_(t)−θ_(t−1)>5°, 0.05* |θ_(t)−θ_(t−1)| is subtractedfrom the value of the target parking action, where θ_(t) and θ_(t−1) arethe included angles (that is, the included angle between thelongitudinal axis direction of the vehicle and the longitudinal axisdirection of the target parking spot) at the two adjacent moments; whena collision and/or an out-of-bounds case occur/occurs in a process ofperforming the target parking action, 10 is subtracted from the value ofthe target parking action; when the predetermined objective is reachedafter the target parking action is performed, 10 is added to the valueof the target parking action; or when another condition occurs in aprocess of performing the target parking action, the value of the targetparking action is neither increased nor reduced.

The updating the automatic parking strategy based on the feedbackinformation is an environment feedback mechanism at the initial stage.The feedback mechanism at the initial stage may further include anotherrule of increasing or reducing the value of the target parking action.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes: when the included angle is greater than a secondincluded angle threshold and less than the first included anglethreshold, determining that the current parking stage is a transitionstage, where both the first included angle threshold and the secondincluded angle threshold are less than 90 degrees, and the secondincluded angle threshold is less than the first included anglethreshold.

The first included angle threshold and the second included anglethreshold may be thresholds specified based on expert experience, andthe first included angle threshold is a value less than 90 degrees. Whenthe included angle is greater than the second included angle thresholdand less than the first included angle threshold, it indicates that apose of the vehicle in this case has been adjusted to an appropriatepose. Therefore, it can be determined that the vehicle is at thetransition stage in this case, and the pose of the vehicle is adjustedbased on a target parking action at the transition stage, so that thevehicle reaches a predetermined objective at the transition stage, toperform an action at a next stage.

In one embodiment, the target parking action at the transition stage isdriving to the target parking spot at a second steering angle, where thesecond steering angle is equal to the maximum steering angle of thevehicle; and the predetermined objective at the transition stage is thatthe included angle is less than or equal to the second included anglethreshold and the vehicle enters the target parking spot.

Both the target parking action and the predetermined objective at thetransition stage may be specified based on expert experience. Becausethe pose of the vehicle has been adjusted to the appropriate pose at theinitial stage, the second steering angle may be the maximum steeringangle of the vehicle, so that the vehicle is quickly adjusted to reachthe predetermined objective.

FIG. 6 is a schematic diagram of a pose of the ego-vehicle at thetransition stage according to this application. The longitudinal axis ofthe ego-vehicle is the preset direction of the ego-vehicle, and thelongitudinal axis of the target parking spot is the reference direction.If it is determined, based on expert experience, that the first includedangle threshold is 60 degrees, the second included angle threshold is 10degrees, and the included angle 0 between the longitudinal axis of theego-vehicle and the longitudinal axis of the target parking spot is 59degrees, it is determined that the current parking stage is thetransition stage. Because the pose of the vehicle at the transitionstage is usually well adjusted, the first steering angle may be asteering angle corresponding to right full steering or left fullsteering, so that the vehicle can quickly enter a next stage from thetransition stage, thereby improving parking efficiency.

After it is determined that the current parking stage is the transitionstage, the target parking action may be determined according to anautomatic parking strategy at the transition stage.

In one embodiment, the automatic parking strategy at the transitionstage is determining, as the target parking action, a parking actionwith a highest value in a plurality of parking actions corresponding tothe current parking stage; and the updating the automatic parkingstrategy based on the feedback information includes: when the feedbackinformation θ_(t) and θ_(t−1), and |θ_(t)|<|θ_(t−1)|, increasing a valueof the target parking action based on θ_(t) and θ_(t−1), where θ_(t) andθ_(t−1) are the included angles at the two adjacent moments, |θ_(t)|≠0,and the value of the target parking action is directly proportional to

$\frac{\theta_{t - 1}}{\theta_{t}};$

and/or when the feedback information is that a collision and/or anout-of-bounds case occur/occurs in a process of performing the targetparking action, reducing the value of the target parking action; and/orwhen the feedback information is that the predetermined objective isreached, increasing the value of the target parking action.

For example, when

${{\theta_{t}} < {\theta_{t - 1}}},\frac{\theta_{t - 1}}{\theta_{t}}$

is added to the value of the target parking action; when a collisionand/or an out-of-bounds case occur/occurs in a process of performing thetarget parking action, 10 is subtracted from the value of the targetparking action; when the predetermined objective is reached after thetarget parking action is performed, 10 is added to the value of thetarget parking action; or when another condition occurs in a process ofperforming the target parking action, the value of the target parkingaction is neither increased nor reduced.

The updating the automatic parking strategy based on the feedbackinformation is an environment feedback mechanism at the transitionstage. The feedback mechanism at the transition stage may furtherinclude another rule of increasing or reducing the value of the targetparking action.

In one embodiment, the determining the current parking stage based on anincluded angle between a preset direction of the vehicle and a referencedirection includes:

when the included angle is less than or equal to the second includedangle threshold, determining that the current parking stage is afine-tuning stage, where the second included angle threshold is lessthan 90 degrees.

The second included angle threshold may be a threshold specified basedon expert experience, and the second included angle threshold is a valueless than 90 degrees. When the included angle is less than or equal tothe second included angle threshold, it indicates that there is a littledifference between a pose of the vehicle in this case and a pose usedwhen parking succeeds. Therefore, it can be determined that the vehicleis at the fine-tuning stage, and the pose of the vehicle is adjustedbased on a target parking action at the fine-tuning stage, so that thevehicle reaches a predetermined objective at the fine-tuning stage tocomplete parking.

In one embodiment, the target parking action at the fine-tuning stage isdriving to the target parking spot at a third steering angle, where thethird steering angle is less than the maximum steering angle of thevehicle; and the predetermined objective at the fine-tuning stage isthat the included angle is less than or equal to a third included anglethreshold and the vehicle enters the target parking spot position, wherethe third included angle threshold is less than the second includedangle threshold.

Both the target parking action and the predetermined objective at thefine-tuning stage may be specified based on expert experience. Becausethere is a little difference between the pose of the vehicle at thefine-tuning stage and the pose of the vehicle that is used when parkingsucceeds, the third steering angle may be a comparatively small angle,to reach the predetermined objective.

FIG. 7 is a schematic diagram of a pose of the ego-vehicle at thefine-tuning stage according to this application. The longitudinal axisof the ego-vehicle is the preset direction of the ego-vehicle, and thelongitudinal axis of the target parking spot is the reference direction.If it is determined, based on expert experience, that the secondincluded angle threshold is 10 degrees, and the included angle 0 betweenthe longitudinal axis of the ego-vehicle and the longitudinal axis ofthe target parking spot is 9 degrees, it is determined that the currentparking stage is the initial stage. The third steering angle may be acomparatively small angle (for example, 1 degree), so that a parkingtrajectory at the fine-tuning stage is much smoother.

After it is determined that the current parking stage is the fine-tuningstage, the target parking action may be determined according to anautomatic parking strategy at the fine-tuning stage.

In one embodiment, the automatic parking strategy at the fine-tuningstage is determining, as the target parking action, a parking actionwith a highest value in a plurality of parking actions corresponding tothe current parking stage; and the updating the automatic parkingstrategy based on the feedback information includes: when the feedbackinformation is d_(t), d_(t−1), θ_(t), and θ_(t−1), and |d_(t)|<|d_(t−1)|and |θ_(t)|<|θ_(t−1)|, increasing a value of the target parking actionbased on d_(t) and |θ_(t−1)|, where d_(t) and d_(t−1) are Euclideandistances between the vehicle and the target parking spot at the twoadjacent moments, θ_(t) and θ_(t−1) are the included angles at the twoadjacent moments, |d_(t)|≠0, and the value of the target parking actionis directly proportional to

$\frac{d_{t - 1}}{d_{t}};$

and/or when the feedback information is that a collision and/or anout-of-bounds case occur/occurs in a process of performing the targetparking action, reducing the value of the target parking action; and/orwhen the feedback information is that the predetermined objective isreached, increasing the value of the target parking action.

For example, when |d_(t)|<|d_(t−1)|and

${{\theta_{t}} < {\theta_{t - 1}}},\frac{d_{t - 1}}{d_{t}}$

is added to the value of the target parking action; when a collisionand/or an out-of-bounds case occur/occurs in a process of performing thetarget parking action, 10 is subtracted from the value of the targetparking action; when the predetermined objective is reached after thetarget parking action is performed, 10 is added to the value of thetarget parking action; or when another condition occurs in a process ofperforming the target parking action, the value of the target parkingaction is neither increased nor reduced.

The updating the automatic parking strategy based on the feedbackinformation is an environment feedback mechanism at the fine-tuningstage. The feedback mechanism at the transition stage may furtherinclude another rule of increasing or reducing the value of the targetparking action.

The foregoing describes in detail the examples of the method fordetermining an automatic parking strategy according to this application.It may be understood that, to implement the foregoing functions, anapparatus for determining an automatic parking strategy includescorresponding hardware structures and/or software modules for performingthe functions. A person of ordinary skill in the art should be easilyaware that units and algorithm steps in the examples described withreference to the embodiments disclosed in this specification may beimplemented in a form of hardware or in a form of a combination ofhardware and computer software in this application. Whether thefunctions are performed by hardware or hardware driven by computersoftware depends on particular applications and design constraints ofthe technical solutions. A person skilled in the art may use differentmethods to implement the described functions for each particularapplication, but it should not be considered that the implementationgoes beyond the scope of this application.

In this application, functional unit division may be performed on theapparatus for determining an automatic parking strategy based on theforegoing method examples. For example, each functional unit may beobtained through division based on a corresponding function in a mannershown in FIG. 4, or two or more functions may be integrated into oneprocessing unit. The integrated unit may be implemented in a form ofhardware, or may be implemented in a form of a software functional unit.It should be noted that, in this application, unit division is anexample, and is merely logical function division. During actualimplementation, another division manner may be used.

When the integrated unit is used, FIG. 8 is a possible schematicstructural diagram of the apparatus for determining an automatic parkingstrategy in the foregoing embodiment. The apparatus 800 for determiningan automatic parking strategy includes a processing unit 801 and anobtaining unit 802. The processing unit 801 is configured to support theapparatus 800 for determining an automatic parking strategy to performsteps such as determining and updating shown in FIG. 4. The obtainingunit 802 is configured to obtain feedback information. The processingunit 801 and the obtaining unit 802 may further be configured to performother processes in the technology described in this specification. Theapparatus 800 may further include a storage unit, configured to storeprogram code and data of the apparatus 800. Examples are as follows:

The processing unit 801 is configured to: determine, according to anautomatic parking strategy, a target parking action corresponding to acurrent parking stage, where the current parking stage is one of aplurality of parking stages included in a parking process of a vehicle;and perform the target parking action.

The obtaining unit 802 is configured to obtain the feedback information,where the feedback information is used to indicate whether performingthe target parking action reaches a predetermined objective.

The processing unit 801 is further configured to update the automaticparking strategy based on the feedback information.

The processing unit 801 may be a processor or a controller, such as acentral processing unit (CPU), a general-purpose processor, a digitalsignal processor (DSP), an application-specific integrated circuit(ASIC), a field programmable gate array (FPGA) or another programmablelogic device, a transistor logic device, a hardware component, or anycombination thereof. The processor may implement or execute variousexample logical blocks, modules, and circuits described with referenceto content disclosed in this application. The processor may be acombination for implementing a computing function, for example, acombination including one or more microprocessors or a combination ofthe DSP and a microprocessor. The obtaining unit 802 may be atransceiver or a communications interface. The storage unit may be amemory.

When the processing unit 801 is a processor, the obtaining unit 802 is acommunications interface, and the storage unit is a memory, theapparatus for determining an automatic parking strategy in thisapplication may be an apparatus shown in FIG. 9.

As shown in FIG. 9, the apparatus 900 includes a processor 901, acommunications interface 902, and a memory 903. The processor 901, thecommunications interface 902, and the memory 903 may communicate witheach other by using an internal connection channel, and transfer acontrol signal and/or a data signal.

It may be clearly understood by a person of skilled in the art that, forease and brief description, for a detailed working process of theforegoing apparatuses and units, reference may be made to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

According to the apparatus 800 and the apparatus 900 provided in thisapplication, the parking process of the vehicle is divided into at leasttwo stages, so that difficulty in implementing an objective at eachstage is reduced, and obtaining an automatic parking strategycorresponding to a complete parking process is much easier, therebyincreasing a success rate of automatic parking in a complex parkingscenario.

The apparatus embodiments completely correspond to the methodembodiments, and corresponding modules perform corresponding steps. Forexample, the obtaining unit performs the obtaining step in the methodembodiment, and other steps than the obtaining step may be performed bythe processing unit or the processor. For a function of a specific unit,refer to a corresponding method embodiment. Details are not describedherein again.

In the embodiments of this application, the sequence numbers of theprocesses do not mean execution sequences. The execution sequences ofthe processes should be determined based on functions and internal logicof the processes, and should not be construed as any limitation on theimplementation processes of this application.

In addition, the term “and/or” in this specification describes only anassociation relationship for describing associated objects andrepresents that three relationships may exist. For example, A and/or Bmay represent the following three cases: Only A exists, both A and Bexist, and only B exists. In addition, the character “/” in thisspecification generally indicates an “or” relationship between theassociated objects.

Aspects or features of this application may be implemented as a method,an apparatus, or a product that uses standard programming and/orengineering technologies. The term “product” used in this applicationcovers a computer program that can be accessed from anycomputer-readable component, carrier or medium. For example, thecomputer-readable medium may include but is not limited to: a magneticstorage component (for example, a hard disk, a floppy disk, or amagnetic tape), an optical disc (for example, a compact disc (CD), adigital versatile disc (DVD), a smart card and a flash memory component(for example, an erasable programmable read-only memory (EPROM), a card,a stick, or a key drive). In addition, various storage media describedin this specification may represent one or more devices and/or othermachine-readable media that are configured to store information. Theterm “machine-readable media” may include but is not limited to awireless channel, and various media that can store, contain and/or carryan instruction and/or data.

A person of ordinary skill in the art may be aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, units and algorithm steps may be implemented byelectronic hardware or a combination of computer software and electronichardware. Whether the functions are performed by hardware or softwaredepends on particular applications and design constraints of thetechnical solutions. A person skilled in the art may use differentmethods to implement the described functions for each particularapplication, but it should not be considered that the implementationgoes beyond the scope of this application.

It may be clearly understood by a person skilled in the art that, forease and brief description, for a detailed working process of theforegoing system, apparatuses, and units, reference may be made to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

In the several embodiments provided in this application, it should beunderstood that the disclosed apparatus and method may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, the unit division is merely logical functiondivision and may be other division during actual implementation. Forexample, a plurality of units or components may be combined orintegrated into another system, or some features may be ignored or notperformed. In addition, the displayed or discussed mutual couplings ordirect couplings or communication connections may be implemented byusing some interfaces. The indirect couplings or communicationconnections between the apparatuses or units may be implemented inelectronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected depending onactual requirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of this application maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units are integrated into one unit.

When the functions are implemented in the form of a software functionalunit and sold or used as an independent product, the functions may bestored in a computer-readable storage medium. Based on such anunderstanding, the technical solutions of this application essentially,or the part contributing to the prior art, or some of the technicalsolutions may be implemented in a form of a software product. Thecomputer software product is stored in a storage medium, and includesseveral instructions for instructing a computer device (which may be apersonal computer, a server, a network device, or the like) to performall or some of the steps of the methods described in the embodiments ofthis application. The foregoing storage medium includes: any medium thatcan store program code, such as a USB flash drive, a removable harddisk, a read-only memory (ROM), a random access memory (RAM), a magneticdisk, or an optical disc.

The foregoing descriptions are merely implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement readily figured out by aperson skilled in the art within the technical scope disclosed in thisapplication shall fall within the protection scope of this application.Therefore, the protection scope of this application shall be subject tothe protection scope of the claims.

What is claimed is:
 1. A method for determining an automatic parkingstrategy, comprising: determining, according to an automatic parkingstrategy, a target parking action corresponding to a current parkingstage, wherein the current parking stage is one of a plurality ofparking stages comprised in a parking process of a vehicle; performingthe target parking action; obtaining feedback information, wherein thefeedback information is used to indicate whether a result of performingthe target parking action reaches a predetermined objective, and thepredetermined objective is a predetermined position of the vehiclerelative to a target parking spot, and/or the predetermined objective isa status of the vehicle in the parking process; and updating theautomatic parking strategy based on the feedback information.
 2. Themethod according to claim 1, wherein before the determining, accordingto an automatic parking strategy, a target parking action correspondingto a current parking stage, the method further comprises: determiningthe current parking stage based on an included angle between a currentpreset direction of the vehicle and a reference direction, wherein thereis a preset correspondence between the current parking stage and theincluded angle.
 3. The method according to claim 2, wherein the presetdirection of the vehicle is a longitudinal axis direction of thevehicle, the reference direction is a longitudinal axis direction of thetarget parking spot, and the included angle is an acute angle or a rightangle.
 4. The method according to claim 3, wherein the determining thecurrent parking stage based on an included angle between a currentpreset direction of the vehicle and a reference direction comprises:when the included angle is greater than or equal to a first includedangle threshold, determining that the current parking stage is aninitial stage, wherein the first included angle threshold is less than90 degrees.
 5. The method according to claim 4, wherein the targetparking action is driving into the target parking spot at a firststeering angle, wherein the first steering angle is less than a maximumsteering angle of the vehicle; and the predetermined objective is thatthe included angle is less than or equal to the first included anglethreshold and the vehicle enters the target parking spot.
 6. The methodaccording to claim 4, wherein the automatic parking strategy comprisesdetermining, as the target parking action, a parking action with ahighest value in a plurality of parking actions corresponding to thecurrent parking stage; and the updating the automatic parking strategybased on the feedback information comprises: when the feedbackinformation comprises the included angles at two adjacent moments duringthe target parking action, and an absolute value of a difference betweenthe included angles at the two adjacent moments is greater than a presetincluded angle threshold, reducing a value of the target parking action.7. The method according to claim 3, wherein the determining the currentparking stage based on an included angle between a current presetdirection of the vehicle and a reference direction comprises: when theincluded angle is greater than a second included angle threshold andless than the first included angle threshold, determining that thecurrent parking stage is a transition stage, wherein both the firstincluded angle threshold and the second included angle threshold areless than 90 degrees, and the second included angle threshold is lessthan the first included angle threshold.
 8. The method according toclaim 7, wherein the target parking action is driving to the targetparking spot at a second steering angle, wherein the second steeringangle is equal to the maximum steering angle of the vehicle; and thepredetermined objective is that the included angle is less than or equalto the second included angle threshold and the vehicle enters the targetparking spot.
 9. The method according to claim 7, wherein the automaticparking strategy comprises determining, as the target parking action,the parking action with the highest value in the plurality of parkingactions corresponding to the current parking stage; and the updating theautomatic parking strategy based on the feedback information comprises:when the feedback information is θ_(t) and θ_(t−1), and|θ_(t)|<|θ_(t−1)|, determining the value of the target parking actionbased on θ_(t) and θ_(t−1), wherein θ_(t) and θ_(t−1) are the includedangles at the two adjacent moments, |θ_(t)|≠0, and the value of thetarget parking action is proportional to$\frac{\theta_{t - 1}}{\theta_{t}}.$
 10. The method according toclaim 3, wherein the determining the current parking stage based on anincluded angle between a current preset direction of the vehicle and areference direction comprises: when the included angle is less than orequal to the second included angle threshold, determining that thecurrent parking stage is a fine-tuning stage, wherein the secondincluded angle threshold is less than 90 degrees.
 11. An apparatus fordetermining an automatic parking strategy, comprising: at least oneprocessor; a non-transitory computer-readable storage medium coupled tothe at least one processor and storing programming instructions forexecution by the at least one processor, the programming instructionsinstruct the at least one processor to perform the following operations:determining, according to an automatic parking strategy, a targetparking action corresponding to a current parking stage, wherein thecurrent parking stage is one of a plurality of parking stages comprisedin a parking process of a vehicle; performing the target parking action;obtaining feedback information, wherein the feedback information is usedto indicate whether a result of performing the target parking actionreaches a predetermined objective, and the predetermined objective is apredetermined position of the vehicle relative to a target parking spot,and/or the predetermined objective is a status of the vehicle in theparking process; and updating the automatic parking strategy based onthe feedback information.
 12. The apparatus according to claim 11,wherein before determining, according to the automatic parking strategy,the target parking action corresponding to the current parking stage,the programming instructions instruct the at least one processor toperform: determining the current parking stage based on an includedangle between a current preset direction of the vehicle and a referencedirection, wherein there is a preset correspondence between the currentparking stage and the included angle.
 13. The apparatus according toclaim 12, wherein the preset direction of the vehicle is a longitudinalaxis direction of the vehicle, the reference direction is a longitudinalaxis direction of the target parking spot, and the included angle is anacute angle or a right angle.
 14. The apparatus according to claim 13,wherein the programming instructions instruct the at least one processorto perform: determining, when the included angle is greater than orequal to a first included angle threshold, the current parking stage isan initial stage, wherein the first included angle threshold is lessthan 90 degrees.
 15. The apparatus according to claim 14, wherein theprogramming instructions instruct the at least one processor to perform:driving the target parking action into the target parking spot at afirst steering angle, wherein the first steering angle is less than amaximum steering angle of the vehicle; and the predetermined objectiveis that the included angle is less than or equal to the first includedangle threshold and the vehicle enters the target parking spot.
 16. Theapparatus according to claim 15, wherein the programming instructionsinstruct the at least one processor to perform: determining theautomatic parking strategy, as the target parking action, a parkingaction with a highest value in a plurality of parking actionscorresponding to the current parking stage; reducing a value of thetarget parking action when the feedback information comprising theincluded angles at two adjacent moments during the target parkingaction, and an absolute value of a difference between the includedangles at the two adjacent moments is greater than a preset includedangle threshold.
 17. The apparatus according to claim 16, wherein theprogramming instructions instruct the at least one processor to perform:determining the current parking stage is a transition stage when theincluded angle is greater than a second included angle threshold andless than the first included angle threshold, wherein both the firstincluded angle threshold and the second included angle threshold areless than 90 degrees, and the second included angle threshold is lessthan the first included angle threshold.
 18. The apparatus according toclaim 17, wherein the programming instructions instruct the at least oneprocessor to perform: driving the target parking action to the targetparking spot at a second steering angle, wherein the second steeringangle is equal to the maximum steering angle of the vehicle; and thepredetermined objective is that the included angle is less than or equalto the second included angle threshold and the vehicle enters the targetparking spot.
 19. The apparatus according to claim 18, wherein theprogramming instructions instruct the at least one processor to perform:determining, as the target parking action, the parking action with thehighest value in the plurality of parking actions corresponding to thecurrent parking stage; determining the value of the target parkingaction based on θ_(t) and θ_(t−1) when the feedback information is θ_(t)and θ_(t−1), and |θ_(t)|<|θ_(t−1)|, wherein θ_(t) and θ_(t−1) are theincluded angles at the two adjacent moments, |θ_(t)|≠0, and the value ofthe target parking action is proportional to$\frac{\theta_{t - 1}}{\theta_{t}}.$
 20. A computer-readable storagemedium, wherein the computer-readable storage medium stores a computerprogram, and the computer program enables a computer to perform a methodcomprising: determining, according to an automatic parking strategy, atarget parking action corresponding to a current parking stage, whereinthe current parking stage is one of a plurality of parking stagescomprised in a parking process of a vehicle; performing the targetparking action; obtaining feedback information, wherein the feedbackinformation is used to indicate whether a result of performing thetarget parking action reaches a predetermined objective, and thepredetermined objective is a predetermined position of the vehiclerelative to a target parking spot, and/or the predetermined objective isa status of the vehicle in the parking process; and updating theautomatic parking strategy based on the feedback information.